package com.tang.dict;

import com.tang.utils.CommonUtils;
import lombok.Getter;
import lombok.Setter;
import org.springframework.beans.BeanUtils;

import java.util.List;

@Getter
@Setter
public class MergedDictParseField extends DictParseField {
    List<DictParseField> children = CommonUtils.newList();

    @Override
    public void callback() {
        if (CommonUtils.isEmpty(children)) return;
        for (DictParseField child : children) {
            BeanUtils.copyProperties(this, child);
            child.callback();
        }
    }
}
